<!--

  $Id: all.html,v 1.11 2006/05/25 10:47:00 justb Exp $
  author: Just van den Broecke

-->
<html>
<head>
<title>All Event</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<style type="text/css">
	@import "../dojo1.7/dijit/themes/nihilo/nihilo.css";
	@import "../dojo1.7/dojo/resources/dojo.css";
</style>
<script type="text/javascript" src="../js/js-pushlet-client.js"></script>
<script type="text/javascript" src="../dojo1.7/dojo/dojo.js" djConfig="parseOnLoad: true, isDebug: true"></script>

<script type="text/javascript">
    
    dojo.require("dojox.layout.ContentPane");
    dojo.require("dojo.io.iframe");
	dojo.require("dijit.layout.BorderContainer");
	dojo.require("dijit.layout.ContentPane");
	dojo.require("dijit.PopupMenuBarItem");
	dojo.require("dijit.MenuBar");
	dojo.require("dijit.Menu");
	dojo.require("dijit.MenuItem");
	dojo.require("dijit.MenuSeparator");
	dojo.require("dojo.data.ItemFileReadStore");
	dojo.require("dijit.Tree");
	dojo.require("dojox.gauges.AnalogGauge");
    dojo.require("dojox.gauges.AnalogArcIndicator");
    dojo.require("dojox.gauges.AnalogNeedleIndicator");
    dojo.require("dojox.gauges.AnalogGauge");
    dojo.require("dojox.gauges.AnalogArcIndicator");
    dojo.require("dojox.gauges.AnalogNeedleIndicator");
    
</script>
</head>
<body class="nihilo" style="align:center" >
	<div dojoType="dijit.layout.BorderContainer" design="headline"
		liveSizing=true style="width: 100%; height: 100%">
		<!-- border-中区 -->
		<div dojoType="dojox.layout.ContentPane" id="centerPanel" splitter="true"
			 region="center" style="width: 80%; height: 80%" >
		</div>
		<!-- border-北区 -->
		<div dojoType="dijit.layout.ContentPane" region="top"
			style="width: 100%; heigth: 10%">
			<div id="menubar" dojoType="dijit.MenuBar">
				<!-- 菜单条的菜单项 -->
				<div dojoType="dijit.PopupMenuBarItem" id="file">
					<span>File</span>
					<!-- 菜单项下拉弹出子菜单 -->
					<div dojoType="dijit.Menu" id="fileMenu">
						<div dojoType="dijit.MenuItem" id="new">New</div>
						<div dojoType="dijit.MenuItem" id="open">Open</div>
						<div dojoType="dijit.MenuSeparator" id="separator"></div>
						<div dojoType="dijit.MenuItem" id="save"
							iconClass="dijitEditorIconSave">Save</div>
						<div dojoType="dijit.PopupMenuItem" id="saveas">
							<span>Save as</span>
							<div dojoType="dijit.Menu" id="subMenu">
								<div dojoType="dijit.MenuItem">*.txt</div>
								<div dojoType="dijit.MenuItem">*.doc</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- border-南区 -->
		<div dojoType="dijit.layout.ContentPane" region="bottom"
				style="width: 100%; height: 10%">Bottom!!!</div>
		<!-- border-西区 树形菜单-->
		<div dojoType="dijit.layout.ContentPane" region="leading"
				style="width: 15%; height: 80%">
												<!--  <div id="treeOne"></div>
												<ul data-dojo-type="dijit.Menu" id="tree_menu" style="display:block;">
										    	<li data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('Hello');}">Item #1</li>
										    	<li data-dojo-type="dijit.MenuItem">Item #2</li>
										  		</ul>
										  		-->
		  <div data-dojo-type="dojo.data.ItemFileReadStore" data-dojo-id="menuContinentStore"
		       data-dojo-props="url:'tree_data.json'"></div>
		  <div data-dojo-type="dijit.tree.ForestStoreModel" data-dojo-id="menuContinentModel"
		       data-dojo-props="store:menuContinentStore,rootId:'name',rootLabel:'系统',
		       childrenAttr:'children',labelAttr:'name',query:{type:'category'}"></div>
		  <div data-dojo-type="dijit.Tree" id="menuTree" data-dojo-props="model:menuContinentModel,showRoot:true,
		       openOnClick:false" onclick="clickTree">
		    
		  </div>
		</div>
		
		<!-- border-东区 -->
		<div dojoType="dijit.layout.ContentPane" region="trailing"
				style="width: 10%; heigth: 80%">Trailing!!!</div>
	</div>
</body>
</html>

<script type="text/javascript">
		     function clickTree(item){
		    	 console.log(dijit.byId("centerPanel"));
		    	 if(item.iframe && item.id=="cpu001"){
		    		 dijit.byId("centerPanel").set("content"
		    		 ,"<iframe style='width:100%;height:100%;border:0px' src='"+item.iframe+"'></iframe>");
		    	 }else if(item.iframe && item.id=="db001"){
		    		 dijit.byId("centerPanel").set("content"
				    		 ,"<iframe style='width:100%;height:100%;border:0px' src='"+item.iframe+"'></iframe>");
		    	 }
		     }
		    
</script>

